home *** CD-ROM | disk | FTP | other *** search
/ Fine Art Gallery Builder / Fine Art Gallery Builder.iso / mac / Fine Art Gallery Builder / Contents / Media / Guide.swf / scripts / frame_1 / DoAction.as
Encoding:
Text File  |  2005-06-16  |  4.3 KB  |  207 lines

  1. function scrollText()
  2. {
  3.    switch(textBox._currentframe)
  4.    {
  5.       case 1:
  6.          return undefined;
  7.       case 2:
  8.          textBox._y = 175 - (slider._y - 153) / 145 * 60;
  9.          break;
  10.       case 3:
  11.          textBox._y = 175 - (slider._y - 153) / 145 * 300;
  12.          break;
  13.       default:
  14.          break;
  15.       case 4:
  16.          return undefined;
  17.    }
  18. }
  19. function scrollArrowUp()
  20. {
  21.    var _loc1_ = undefined;
  22.    if(textBox._currentframe == 2)
  23.    {
  24.       _loc1_ = 10;
  25.    }
  26.    else
  27.    {
  28.       _loc1_ = 30;
  29.    }
  30.    if(textBox._y >= 175)
  31.    {
  32.       textBox._y = 175;
  33.       slider._y = 151.7;
  34.       return undefined;
  35.    }
  36.    if(textBox._y <= 185)
  37.    {
  38.       textBox._y += 5;
  39.       slider._y = 151.7 - (textBox._y - 175) / _loc1_ * 14.3;
  40.       return undefined;
  41.    }
  42.    if(glossText._y >= 185)
  43.    {
  44.       textBox._y = 175;
  45.       slider._y = 151.7;
  46.    }
  47. }
  48. function scrollArrowDown()
  49. {
  50.    var _loc2_ = undefined;
  51.    var _loc1_ = undefined;
  52.    if(textBox._currentframe == 2)
  53.    {
  54.       _loc2_ = 100;
  55.       _loc1_ = 125;
  56.    }
  57.    else
  58.    {
  59.       _loc2_ = 326.9;
  60.       _loc1_ = -124.9;
  61.    }
  62.    if(textBox._y <= _loc1_)
  63.    {
  64.       textBox._y = _loc1_;
  65.       slider._y = 295;
  66.       return undefined;
  67.    }
  68.    if(textBox._y >= _loc1_)
  69.    {
  70.       textBox._y -= 5;
  71.       slider._y = 151.7 - (textBox._y - 210) / _loc2_ * 143.3;
  72.    }
  73.    else if(textBox._y < _loc1_)
  74.    {
  75.       textBox._y = _loc1_;
  76.       slider._y = 295;
  77.    }
  78. }
  79. var myInterval;
  80. upBtn.enabled = false;
  81. downBtn.enabled = false;
  82. toolsCur._visible = false;
  83. tools2Cur._visible = false;
  84. catalogCur._visible = false;
  85. var thisMovieClip = this;
  86. button.prototype.tabEnabled = false;
  87. button.prototype.onRollOver = function()
  88. {
  89.    flashToDirector("SetCursor","finger");
  90. };
  91. button.prototype.onRollOut = function()
  92. {
  93.    flashToDirector("SetCursor","arrow");
  94. };
  95. gettingSarted.onPress = function()
  96. {
  97.    startedCur._visible = true;
  98.    toolsCur._visible = false;
  99.    tools2Cur._visible = false;
  100.    catalogCur._visible = false;
  101.    upBtn.enabled = false;
  102.    downBtn.enabled = false;
  103.    textBox._y = 175;
  104.    slider._y = 152;
  105.    textBox.gotoAndStop(1);
  106. };
  107. galleryToolsBtn.onPress = function()
  108. {
  109.    toolsCur._visible = true;
  110.    startedCur._visible = false;
  111.    tools2Cur._visible = false;
  112.    catalogCur._visible = false;
  113.    upBtn.enabled = true;
  114.    downBtn.enabled = true;
  115.    textBox._y = 175;
  116.    slider._y = 152;
  117.    textBox.gotoAndStop(2);
  118. };
  119. moreTools.onPress = function()
  120. {
  121.    tools2Cur._visible = true;
  122.    toolsCur._visible = false;
  123.    startedCur._visible = false;
  124.    catalogCur._visible = false;
  125.    upBtn.enabled = true;
  126.    downBtn.enabled = true;
  127.    textBox._y = 175;
  128.    slider._y = 152;
  129.    textBox.gotoAndStop(3);
  130. };
  131. artCatalog.onPress = function()
  132. {
  133.    catalogCur._visible = true;
  134.    toolsCur._visible = false;
  135.    tools2Cur._visible = false;
  136.    startedCur._visible = false;
  137.    upBtn.enabled = false;
  138.    downBtn.enabled = false;
  139.    textBox._y = 175;
  140.    slider._y = 152;
  141.    textBox.gotoAndStop(4);
  142. };
  143. upBtn.onPress = function()
  144. {
  145.    scrollArrowUp();
  146.    myInterval = setInterval(scrollArrowUp,50);
  147. };
  148. upBtn.onRelease = function()
  149. {
  150.    clearInterval(myInterval);
  151. };
  152. upBtn.onReleaseOutside = function()
  153. {
  154.    clearInterval(myInterval);
  155. };
  156. downBtn.onPress = function()
  157. {
  158.    scrollArrowDown();
  159.    myInterval = setInterval(scrollArrowDown,50);
  160. };
  161. downBtn.onRelease = function()
  162. {
  163.    clearInterval(myInterval);
  164. };
  165. downBtn.onReleaseOutside = function()
  166. {
  167.    clearInterval(myInterval);
  168. };
  169. closeGuide.onPress = function()
  170. {
  171.    thisMovieClip._visible = false;
  172. };
  173. printPage.onPress = function()
  174. {
  175.    var _loc1_ = new PrintJob();
  176.    var _loc2_ = _loc1_.start();
  177.    if(_loc2_)
  178.    {
  179.       var _loc4_ = _loc1_.addPage("printClip");
  180.       var _loc3_ = _loc1_.addPage("printClip2");
  181.       _loc3_ = _loc1_.addPage("printClip3");
  182.       if(!_loc4_ || !_loc3_ || !page3OK)
  183.       {
  184.       }
  185.       _loc1_.send();
  186.    }
  187.    false;
  188. };
  189. slider.onPress = function()
  190. {
  191.    flashToDirector("SetCursor","hand");
  192.    startDrag(slider,0,614,152,614,297);
  193.    myInterval = setInterval(scrollText,50);
  194. };
  195. slider.onRelease = function()
  196. {
  197.    flashToDirector("SetCursor","finger");
  198.    clearInterval(myInterval);
  199.    stopDrag();
  200. };
  201. slider.onReleaseOutside = function()
  202. {
  203.    flashToDirector("SetCursor","finger");
  204.    clearInterval(myInterval);
  205.    stopDrag();
  206. };
  207.